package com.ll.gulimall.cart.service;

import com.ll.gulimall.cart.vo.Cart;
import com.ll.gulimall.cart.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {
    CartItem addToCart(String skuId, Integer num) throws ExecutionException, InterruptedException;

    CartItem getCartItem(String skuId);

    /**
     * 获取购物车
     * @return
     */
    Cart getCart() throws ExecutionException, InterruptedException;


    void clearCart(String cartKey);


    void checkedItem(Long skuId, Integer checked);

    void changeNum(Long skuId, Integer num);

    void delCartItem(Long skuId);

    List<CartItem> getUserCartItems();
}
